# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-kaitaistruct
pkgver=0.10
pkgrel=2
pkgdesc="Kaitai Struct declarative parser generator for binary data: runtime library for Python"
arch=('any')
license=('MIT')
url="https://kaitai.io"
depends=('python')
makedepends=('python-setuptools' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://github.com/kaitai-io/kaitai_struct_python_runtime/archive/$pkgver.tar.gz")
sha512sums=('ce22445afe7f6713cccc1ffb0714892dcff171d84b89a0cd49441dd36a464f6c764aa89d75f556d06eee82ab4432af27a0ef4313e47272a5f55fee2dba1252f0')

build() {
  cd kaitai_struct_python_runtime-$pkgver
  python setup.py build
}

package() {
  cd kaitai_struct_python_runtime-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
